var obj={
    name:'terry',
    age:12
};
// 1.点访问法
console.log(obj.name);
console.log(obj.age);
console.log(obj.gender);
// 2.中括号访问
var name='age'
console.log(obj['name']);